﻿using System;

namespace Microsoft.Popfly.GameCreator.GameEngine.Events
{
    public class EveryFrameChecker : IEventChecker
    {
        private Game m_game;

        public EveryFrameChecker(Game game)
        {
            m_game = game;
        }

        #region IEventChecker Members

        public bool FireThisFrame(double elapsedTimeInSeconds, out BehaviorOwner sender, out PGCEventArgs args)
        {
            sender = m_game.CurrentScene;
            args = null;
            return true;
        }

        public bool IsOfEventType(string eventType)
        {
            return eventType == "Timer" || eventType == "timer";
        }

        #endregion
    }


}
